<?php
require('config.php');

        $user_id=$_REQUEST['user_id'];
        //$user_id=9;
		$sql="select *,id as Id from `".$oto."_score_record` where userid='$user_id' order by id DESC";
		$result=$db->query($sql);
		while($row=$result->fetch_assoc()){
			$jf_jilu[]=$row;//将取得的所有数据赋值给person_info数组
		}
		if(isset($jf_jilu))
		{
			for($i=0;$i<count($jf_jilu);$i++)
			{
				if($jf_jilu[$i]['type']==1) $jf_jilu[$i]['msg']='购买商品';
				if($jf_jilu[$i]['type']==2) $jf_jilu[$i]['msg']='取消订单';
				if($jf_jilu[$i]['type']==3) $jf_jilu[$i]['msg']='充值';
				if($jf_jilu[$i]['type']==4) $jf_jilu[$i]['msg']='订单无效';
				if($jf_jilu[$i]['type']==5) $jf_jilu[$i]['msg']='活动';
				if($jf_jilu[$i]['type']==6) $jf_jilu[$i]['msg']='评价订单';
				if($jf_jilu[$i]['type']==7) $jf_jilu[$i]['msg']='积分兑换';
			}
			echo json_encode($jf_jilu);
		}
		else
		{
			echo '[]';
		}	
?>